<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\lbs\track\waybill\service\entity;

class LbsAcceptCarrierImageInfoContent {
	
	static $_TSPEC;
	public $photo_url = null;
	public $photo_url2 = null;
	public $photo_url3 = null;
	public $photo_url4 = null;
	public $photo_url5 = null;
	public $photo_type = null;
	public $photo_collect_time = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'photo_url'
			),
			2 => array(
			'var' => 'photo_url2'
			),
			3 => array(
			'var' => 'photo_url3'
			),
			4 => array(
			'var' => 'photo_url4'
			),
			5 => array(
			'var' => 'photo_url5'
			),
			6 => array(
			'var' => 'photo_type'
			),
			7 => array(
			'var' => 'photo_collect_time'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['photo_url'])){
				
				$this->photo_url = $vals['photo_url'];
			}
			
			
			if (isset($vals['photo_url2'])){
				
				$this->photo_url2 = $vals['photo_url2'];
			}
			
			
			if (isset($vals['photo_url3'])){
				
				$this->photo_url3 = $vals['photo_url3'];
			}
			
			
			if (isset($vals['photo_url4'])){
				
				$this->photo_url4 = $vals['photo_url4'];
			}
			
			
			if (isset($vals['photo_url5'])){
				
				$this->photo_url5 = $vals['photo_url5'];
			}
			
			
			if (isset($vals['photo_type'])){
				
				$this->photo_type = $vals['photo_type'];
			}
			
			
			if (isset($vals['photo_collect_time'])){
				
				$this->photo_collect_time = $vals['photo_collect_time'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'LbsAcceptCarrierImageInfoContent';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("photo_url" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_url);
				
			}
			
			
			
			
			if ("photo_url2" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_url2);
				
			}
			
			
			
			
			if ("photo_url3" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_url3);
				
			}
			
			
			
			
			if ("photo_url4" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_url4);
				
			}
			
			
			
			
			if ("photo_url5" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_url5);
				
			}
			
			
			
			
			if ("photo_type" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->photo_type);
				
			}
			
			
			
			
			if ("photo_collect_time" == $schemeField){
				
				$needSkip = false;
				$input->readI64($this->photo_collect_time); 
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		$xfer += $output->writeFieldBegin('photo_url');
		$xfer += $output->writeString($this->photo_url);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->photo_url2 !== null) {
			
			$xfer += $output->writeFieldBegin('photo_url2');
			$xfer += $output->writeString($this->photo_url2);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->photo_url3 !== null) {
			
			$xfer += $output->writeFieldBegin('photo_url3');
			$xfer += $output->writeString($this->photo_url3);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->photo_url4 !== null) {
			
			$xfer += $output->writeFieldBegin('photo_url4');
			$xfer += $output->writeString($this->photo_url4);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->photo_url5 !== null) {
			
			$xfer += $output->writeFieldBegin('photo_url5');
			$xfer += $output->writeString($this->photo_url5);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldBegin('photo_type');
		$xfer += $output->writeString($this->photo_type);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('photo_collect_time');
		$xfer += $output->writeI64($this->photo_collect_time);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>